<ul>
	<?php
	$con = mysqli_connect ( "localhost", "cms", "cms", "cms" );
	if (mysqli_connect_errno ()) { // Check connection
		echo "Failed to connect to MySQL: " . mysqli_connect_error ();
	}
	$result = mysqli_query ( $con, "SELECT id,title FROM page WHERE topmenu=1" );
	
	if ($result) {
	while ( $page = mysqli_fetch_array ( $result ) ) {
		?>
					<li>
					  <a href="<?php echo 'page.php?id='.$page[id]; ?>">
					  <?php echo $page[title]; ?></a></li>
				<?php
		}
	}
	?>
</ul>